---
title: Battery Level
description: A widget that shows battery level of different devices
---

<ComponentPreview name="widget-battery-level--docs" />

## Installation

<Steps>

<Step>Update `tailwind.config.js`</Step>
```js
theme: {
    extend: {
     colors: {
        foreground: "hsl(var(--foreground))",
        background: "hsl(var(--background))",
     }
    },
  },
```

<Step>Run the following command</Step>

It will create a new file called `battery-level.tsx` inside the `components/animata/widget` directory.

```bash
mkdir -p components/animata/widget && touch components/animata/widget/battery-level.tsx
```

<Step>Paste the code</Step>

Open the newly created file and paste the following code:

```jsx file=<rootDir>/animata/widget/battery-level.tsx

```

</Steps>

## Credits

Built by [hari](https://github.com/hari)
